
namespace Pepper.Forms
{
using System.Collections.Generic;
    using System;
    using System.Windows.Input;
    using System.Diagnostics;
    using System.Globalization;
    using System.IO;
    using System.Threading;
    using System.Windows;
    using Microsoft.WindowsAPICodePack.Dialogs;
    using Pepper.Core;
    [DebuggerDisplay("\\{ UserId = {UserId}, Password = {Password} \\}")]
    public sealed class UserDetails : IEquatable<UserDetails>
    {
        private readonly Guid _UserId;
        private readonly string _Password;

        public UserDetails(Guid userId, string password)
        {
            _UserId = userId;
            _Password = password;
        }

        public override bool Equals(object obj)
        {
            if (obj is UserDetails)
                return Equals((UserDetails)obj);
            return false;
        }
        public bool Equals(UserDetails obj)
        {
            if (obj == null)
                return false;
            if (!EqualityComparer<object>.Default.Equals(_UserId, obj._UserId))
                return false;
            if (!EqualityComparer<object>.Default.Equals(_Password, obj._Password))
                return false;
            return true;
        }
        public override int GetHashCode()
        {
            int hash = 0;
            hash ^= EqualityComparer<object>.Default.GetHashCode(_UserId);
            hash ^= EqualityComparer<object>.Default.GetHashCode(_Password);
            return hash;
        }
        public override string ToString()
        {
            return String.Format("{{ UserId = {0}, Password = {1} }}", _UserId, _Password);
        }

        public Guid UserId
        {
            get
            {
                return _UserId;
            }
        }

        public string Password
        {
            get
            {
                return _Password;
            }
        }
    }
}
